package com.cfx.exercise_42;

public class ArrTest {

	public static void main(String[] args) {
		
		int[] arr = new int[]{5,6,4,3,7,2,1};
		int[] copeArr = new int[7];
		System.arraycopy(arr, 0, copeArr, 0, 7);
		for (int i = 0; i < copeArr.length-1; i++) {
			for (int j = i+1; j < copeArr.length; j++) {
				if(copeArr[i]>copeArr[j]){
					int temp = copeArr[i];
					copeArr[i] = copeArr[j];
					copeArr[j] = temp;
				}
			}
		}
		for (int i = 0; i < copeArr.length; i++) {
			System.out.println(copeArr[i]);
		}
	}
}
